using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.WorkFlow.Entities
{
public partial class TaskData
{
readonly static Action<TaskData,object>[] _SetValues=new Action<TaskData,object>[]{(r,t)=>r.DataIndex=Reflection.ParseObject(t, r.DataIndex),(r,t)=>r.DataName=Reflection.ParseObject(t, r.DataName),(r,t)=>r.DataText=Reflection.ParseObject(t, r.DataText),(r,t)=>r.DataValue=Reflection.ParseObject(t, r.DataValue),(r,t)=>r.InstanceId=Reflection.ParseObject(t, r.InstanceId)};
readonly static string[] _Columns=new string[]{"DataIndex","DataName","DataText","DataValue","InstanceId"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"DataIndex", this.DataIndex);
AppendValue(action,"DataName", this.DataName);
AppendValue(action,"DataText", this.DataText);
AppendValue(action,"DataValue", this.DataValue);
AppendValue(action,"InstanceId", this.InstanceId);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[5];
cols[0]= RecordColumn.Column("DataIndex",this.DataIndex);
cols[1]= RecordColumn.Column("DataName",this.DataName);
cols[2]= RecordColumn.Column("DataText",this.DataText);
cols[3]= RecordColumn.Column("DataValue",this.DataValue);
cols[4]= RecordColumn.Column("InstanceId",this.InstanceId);
return cols;
}

}
}

